package com.fangyi.yunmusic.controller.es;


import com.fangyi.yunmusic.pojo.es.UserDocument;
import com.fangyi.yunmusic.service.es.UserSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserSearchController {

    @Autowired
    private UserSearchService userSearchService;

    @GetMapping("/user/search")
    public Object queryUser(Integer pageNum, Integer pageSize, String query) {
        Page<UserDocument> page = userSearchService.queryUser(pageNum, pageSize, query);
        return page;
    }


}
